home *** CD-ROM | disk | FTP | other *** search
/ Champak 45 / Vol 45.iso / games / escape.swf / scripts / frame_1 / PlaceObject2_152_71 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2005-08-23  |  2.7 KB  |  117 lines

  1. onClipEvent(enterFrame){
  2.    if(_global.over == 0)
  3.    {
  4.       if(Key.isDown(40) && nop1 == 0)
  5.       {
  6.          if(nop3 <= 15)
  7.          {
  8.             nop3 += 1;
  9.             this._height += 4;
  10.             this._width += 3;
  11.             this._y += 5;
  12.          }
  13.       }
  14.       else if(nop3 > 0)
  15.       {
  16.          nop3 -= 1;
  17.          this._height -= 4;
  18.          this._width -= 3;
  19.          this._y -= 5;
  20.       }
  21.       if(_root.target_s == 1 && nop1 == 0 && key_push == 0 && nop3 == 0)
  22.       {
  23.          if(Key.isDown(32))
  24.          {
  25.             nop1 = 1;
  26.             tmp = _Y;
  27.             _root.mySound.attachSound("s_jump.wav");
  28.             _root.mySound.start([0,1]);
  29.          }
  30.       }
  31.       if(Key.isDown(32))
  32.       {
  33.          key_push = 1;
  34.       }
  35.       else
  36.       {
  37.          key_push = 0;
  38.       }
  39.       if(nop1 != 0)
  40.       {
  41.          t1 += 1.5;
  42.          _Y = _Y - (20 - 1 * t1);
  43.          if(_Y >= tmp)
  44.          {
  45.             _Y = tmp;
  46.             t1 = 0;
  47.             nop1 = 0;
  48.          }
  49.       }
  50.       temp = _global.depth - 5;
  51.       i = temp;
  52.       while(i < temp + 7)
  53.       {
  54.          baku = "_root.bakuhatu" + i;
  55.          if(hitTest(baku) && nop2 < 1)
  56.          {
  57.             nop2 = 11;
  58.             _global.gauge += _global.damage_1;
  59.             _global.gauge_b += _global.damage_1;
  60.             _root.mySound.attachSound("s_damage.wav");
  61.             _root.mySound.start([0,1]);
  62.          }
  63.          i++;
  64.       }
  65.       temp = _global.depth - 10;
  66.       i = temp;
  67.       while(i < temp + 12)
  68.       {
  69.          las = "_root.laser" + i;
  70.          if(hitTest(las) && nop2 < 6)
  71.          {
  72.             nop2 = 11;
  73.             _global.gauge += _global.damage_2;
  74.             _global.gauge_b += _global.damage_2;
  75.             _root.mySound.attachSound("s_damage.wav");
  76.             _root.mySound.start([0,1]);
  77.          }
  78.          i++;
  79.       }
  80.       temp = _global.depth - 2;
  81.       i = temp;
  82.       while(i < temp + 3)
  83.       {
  84.          hado = "_root.hadou" + i;
  85.          if(hitTest(hado) && nop3 < 10)
  86.          {
  87.             nop2 = 11;
  88.             _global.gauge += _global.damage_3;
  89.             _global.gauge_b += _global.damage_3;
  90.             _root.mySound.attachSound("s_damage.wav");
  91.             _root.mySound.start([0,1]);
  92.          }
  93.          i++;
  94.       }
  95.       if(nop2 > 0)
  96.       {
  97.          nop2 -= 1;
  98.       }
  99.       if(nop2 != 0)
  100.       {
  101.          _root.chara01.gotoAndStop("damage");
  102.       }
  103.       else if(nop1 == 1)
  104.       {
  105.          _root.chara01.gotoAndStop("jump");
  106.       }
  107.       else if(nop3 > 3)
  108.       {
  109.          _root.chara01.gotoAndStop("kaihi");
  110.       }
  111.       else
  112.       {
  113.          _root.chara01.gotoAndStop("run");
  114.       }
  115.    }
  116. }
  117.